use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct ApplicationConfig {
    pub db: Db,
    pub server: ServerConfig,
}

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct Db {
    pub database: String,
    pub username: String,
    pub password: String,
    pub host: String,
    pub port: u16,
}

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct ServerConfig {
    pub port: Option<u16>,
    pub context_path: Option<String>,
    pub server_name: Option<String>,
    pub host: Option<String>,
    pub group_name: Option<String>,
    pub namespace_id: Option<String>,
    pub protect_threshold: Option<String>,
    pub metadata: Option<String>,
    pub selector: Option<String>,
}
